<title>Simjamkesda Berau</title>
<?php
	include ('../../config/koneksi.php');
	include ('../../config/fungsi_tgl_indo.php');
	include ('../../config/library.php');
?>
	<link href="../../asset/css/style_kartu.css" rel="stylesheet" type="text/css">
	<link href="../../asset/css/cetak.css" rel="stylesheet" type="text/css">
<?php
	$id=$_GET['id'];
	cetak_barcode($id);
	$tgl = tgl_indonesia(date("Y-m-d"));
	$sql=mysql_query("select id_jaminan, p.id_peserta, nama, tempat_lahir, tgl_lahir, jenis_peserta,ja.tgl_mulai, ja.tgl_selesai, id_jaminan_sebelumnya, jenis_kunjungan, catatan_kunjungan, pn.jk from jaminan ja inner join peserta p on ja.id_peserta = p.id_peserta inner join penduduk pn on p.id_penduduk = pn.id_penduduk inner join jenis_peserta j on p.id_jenis_peserta = j.id_jenis_peserta inner join jenis_kunjungan jn on jn.id_jenis_kunjungan = ja.id_jenis_kunjungan inner join catatan_kunjungan c on ja.id_catatan_kunjungan = c.id_catatan_kunjungan where id_jaminan='$id'");

	$hasil = mysql_fetch_array($sql);
	echo "cc".$hasil['jk'];
	$pejabat = mysql_fetch_array(mysql_query("select * from setting where id_setting = 2"));
?>

<script type="text/JavaScript">
	function eventualRedirect(redirectTo, timeoutPeriod) {
		setTimeout("location.href = redirectTo;",timeoutPeriod);
	}
</script>

<script type="text/JavaScript">
	setTimeout("location.href = 'http://myweb.com/berau/utama.php?module=mod_jaminan';",5000);
</script>

<div id="cetak">
	<table width="730" align="center">
		<tr>
			<td colspan="6" align="center">
				<img src="../../asset/images/header.jpg" width="730">
			</td>
		</tr>
		<tr>
			<td colspan="6" align="center">
				<span id="id_jaminan"><?php echo "*$hasil[id_jaminan]*"; ?></span>
			</td>
		</tr>
		<tr>
			<td colspan="6" align="center">
				<b>SURAT JAMINAN PELAYANAN PESERTA JAMINAN KESEHATAN DAERAH BERAU</b>
			</td>
		</tr>
		<tr>
			<td colspan="6" align="center">
				<?php
					if($hasil['tgl_input'] == $hasil['tgl_mulai'] && $hasil['tgl_input'] == $hasil['tgl_selesai']){
						echo "<b>Berlaku : 1 (Satu) Kali Kunjungan</b>";
					}else{
						echo "<b>Berlaku : ".tgl_ind1($hasil['tgl_mulai'])." s.d. ".tgl_ind1($hasil['tgl_selesai'])."</b>";
					}
				?>
			</td>
		</tr>
		<tr>
			<td colspan="6" align="right">
				<span id="id_jaminan"><?php echo "*$hasil[id_jaminan]*"; ?></span>
			</td>
		</tr>
		<tr>
			<td colspan="6" align="center">&nbsp;</td>
		</tr>
		<tr>
			<td width="150">No. Kartu Jamkesda</td>
			<td width="5">:</td>
			<td width="300"><?php echo $hasil['id_peserta']; ?></td>
			<td width="120">No. SJP</td>
			<td width="5">:</td>
			<td width="150"><?php echo $hasil['id_jaminan']; ?></td>
		</tr>
		<tr>
			<td>Nama Peserta</td>
			<td>:</td>
			<td><?php echo $hasil['nama']; ?></td>
			<td></td>
			<td></td>
			<td></td>
		</tr>
		<tr>
			<td>Tempat, Tgl Lahir</td>
			<td>:</td>
			<td><?php echo $hasil['tempat_lahir'].", ".tgl_ind1($hasil['tgl_lahir']); ?></td>
			<td>Jenis Kelamin</td>
			<td>:</td>
			<td>
				<?php
					if($hasil['jk'] == 'L'){
						echo "Laki-laki";
					}else{
						echo "Perempuan";
					}
				?>
			</td>
		</tr>
		<tr>
			<td>Jenis Kunjungan</td>
			<td>:</td>
			<td><?php echo $hasil['jenis_kunjungan']; ?></td>
			<td>Asal Peserta</td>
			<td>:</td>
			<td><?php echo $hasil['jenis_peserta']; ?></td>
		</tr>
		<tr>
			<td>Catatan Kunjungan</td>
			<td>:</td>
			<td><?php echo $hasil['catatan_kunjungan']; ?></td>
			<td></td>
			<td></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td></td>
			<td></td>
			<td colspan="3" align="center">Berau, <?php echo tgl_indonesia($hasil['tgl_mulai']); ?></td>
		</tr>
		<tr>
			<td colspan="3">Catatan :</td>
			<td colspan="3" align="center"><?php echo $pejabat['jabatan'];?></td>
		</tr>
		<tr>
			<td colspan="3">1. Ruang Rawat Inap Kelas III</td>
			<td colspan="3" align="center"></td>
		</tr>
		<tr>
			<td colspan="3">2. Tidak berlaku untuk Rumah Sakit yang tidak memiliki hubungan kerjasama.</td>
			<td colspan="3" align="center"></td>
		</tr>
		<tr>
			<td colspan="3">&nbsp;</td>
			<td colspan="3" align="center"><?php echo $pejabat['nama'];?></td>
		</tr>
	</table>
</div>